package com.firefly.dao.assembler.cms;

import com.firefly.dao.dao.cms.po.ConfigPo;
import com.firefly.dao.dto.cms.ConfigDto;
import com.firefly.dao.vo.cms.ConfigVo;
import org.springframework.stereotype.Component;

/**
 * @description: CMS系统配置
 * @author: lzg(萤火科技 ： 854378082 @ qq.com)
 * @date: 2022/12/12
 **/
@Component
public class ConfigAssembler {
    public ConfigPo getPo(ConfigDto detail){
        ConfigPo entity = new ConfigPo();
        entity.setId(detail.getId());
        entity.setSitename(detail.getSitename());
        entity.setDescription(detail.getDescription());
        entity.setPerson(detail.getPerson());
        entity.setPhone(detail.getPhone());
        entity.setEmail(detail.getEmail());
        entity.setAddress(detail.getAddress());
        return entity;
    }
    public ConfigVo getVo(ConfigPo entity){
        ConfigVo detail = new ConfigVo();
        detail.setId(entity.getId());
        detail.setSitename(entity.getSitename());
        detail.setDescription(entity.getDescription());
        detail.setPerson(entity.getPerson());
        detail.setPhone(entity.getPhone());
        detail.setEmail(entity.getEmail());
        detail.setAddress(entity.getAddress());
        return detail;
    }
}
